Re: Index unused with OR?

Поиск
Список
Период
Сортировка
От Olaf Mittelstaedt
Тема Re: Index unused with OR?
Дата
Msg-id l03110706b18885fd4b0d@[147.233.159.109]
обсуждение исходный текст
Список pgsql-general
> Unrelated to the question in hand - you complained about VACUUM not
> properly updating the stats. It seems to me you should use VACUUM ANALYZE
> for that to happen. Just vacuuming means elimination of old rows no longer
> used.
>
> Herouth

Thanks for your hint, the statistics got updated now with VACUUM
ANALYZE, but indexes aren't used anyway when combining indexed
columns with OR in the WHERE part:

w=> vacuum;
VACUUM
w=> vacuum analyze;
VACUUM
w=> explain select * from p where (m=29000) or (m=30000);
NOTICE:  QUERY PLAN:

Seq Scan on p  (cost=336.92 size=834 width=10)

EXPLAIN
w=>

Kind regards,
Olaf
--
Olaf Mittelstaedt - IuK - mittelstaedt@fh-ulm.de
Fachhochschule Ulm  Prittwitzstr. 10   89075 Ulm
Tel.: +49 (0)731-502-8220             Fax: -8270

 Tertium non datur.



В списке pgsql-general по дате отправления:

Предыдущее
От: "Jose' Soares Da Silva"
Дата:
Сообщение: Re: [GENERAL] extracting date information?
Следующее
От: "Jackson, DeJuan"
Дата:
Сообщение: RE: [GENERAL] Re: Index unused with OR?